﻿<Window x:Class="S7.Windows.Chat.ShowChat"
        Closed="Window_Closed"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:custom="clr-namespace:S7;assembly=S7"
    Title="Chat" Height="600" Width="600" WindowStyle="ToolWindow" WindowStartupLocation="CenterScreen" Background="{DynamicResource BackgroundColor}" FontSize="18" Loaded="Window_Loaded">
    <Grid>
    	<Grid Margin="8" Grid.Column="1">
    		<Label HorizontalAlignment="Center" Content="Live Chat" VerticalAlignment="Top"/>
    		<ListBox x:Name="lbChat" ItemTemplate="{DynamicResource tmpChat}" Margin="0,23.94,0,-0.11" ItemsSource="{Binding custom:ChatServer.ChatMsgs}">
    			<ListBox.Resources>
    				<DataTemplate x:Key="tmpChat">
    					<StackPanel Orientation="Horizontal">
    						<TextBox TextWrapping="Wrap" FontSize="16" FontWeight="Bold" CharacterCasing="Upper" Text="{Binding name}"/>
    						<TextBox TextWrapping="Wrap" FontSize="16" Text="{Binding message}"/>
    					</StackPanel>
    				</DataTemplate>
    			</ListBox.Resources>
    		</ListBox>
    	</Grid>
    </Grid>
</Window>